<?php
/**
 * 会话管理
 * 
 * @author  Lee<a605333742@gmail.com>
 * @time    2016-08-09
 */
namespace Admin\Controller; 

class ImController extends CommonController{
    /*
     * 构造函数
     * 
     * @return #
     */
    public function _initialize() {
        parent::_initialize();
    }    
    
    /*
     * index前置操作
     * 
     * @return #
     */
    public function _before_index(){
        if(I("request.assign_user")){
            $_REQUEST['assign_user_id'] =A("Common")->getIds(I("request.assign_user"),"name","User");
        }
        if(I("request.accept_user")){
            $_REQUEST['accept_user_id'] =A("Common")->getIds(I("request.accept_user"),"name","User");
        }
    }
    
    /*
     * 编辑后置操作
     * 
     * @return #
     */
    public function _before_edit(){
        if(I("request.type")==1){
            $map['status']  =1;
            $map['id']      =array("gt",0);
            D("User")->where($map)->setInc("system_num");
        }
    }
}
